package com.jiexin.dao;

import com.jiexin.beans.PageQuery;
import com.jiexin.model.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser findByKeyword(@Param("keyword") String keyword);

    int countByMail(@Param("mail") String mail, @Param("id") Integer id);

    int countByTelephone(@Param("telephone") String telephone, @Param("id") Integer id);

    int countByDeptId(@Param("deptId") int deptId); //根据部门id查询用户数量

    List<SysUser> getPageByDeptId(@Param("deptId") int deptId, @Param("page") PageQuery page);//根据部门id查询用户具体信息

    List<SysUser> getUserListByUserIdList(@Param("userIdList") List<Integer> userIdList);

    List<SysUser> getAllUser();
}